package com.kakarote.hrm.constant;

/**
 * 分组状态
 */
public enum EmployeeLableGroup {
    LABLE_GROUP_1(1, 1,"员工基本信息表"),
    LABLE_GROUP_11(11, 1,"岗位信息表"),
    LABLE_GROUP_3(3, 1,"员工教育信息"),
    LABLE_GROUP_7(7,1, "员工家庭成员信息表"),
    LABLE_GROUP_9(9,0, "员工主要社会关系表"),
    LABLE_GROUP_13(13,1, "员工专技工人证书表"),
    LABLE_GROUP_51(51,1, "员工兼职信息表"),
    LABLE_GROUP_4(4, 1,"员工工作经历表"),
    LABLE_GROUP_8(8,1, "专业技术职称表"),
    LABLE_GROUP_6(6, 0,"培训经历"),
    LABLE_GROUP_2(2,0,"员工通讯信息表"),
    LABLE_GROUP_5(5,1, "职业资格表"),
    LABLE_GROUP_12(12, 0,"员工离职信息表"),
    LABLE_GROUP_21(21, 0, "员工合同信息表"),
    LABLE_GROUP_31(31, 0,"员工工资卡信息表"),
    LABLE_GROUP_32(32,0,"员工社保信息表"),
    LABLE_GROUP_99(99,0,"公用信息表");

    EmployeeLableGroup(int value, int status, String name) {
        this.value = value;
        this.status = status;
        this.name = name;
    }


    private String name;
    private int value;
    private int status;

    public static String parseName(int type){
        for(EmployeeLableGroup value : EmployeeLableGroup.values()){
            if(value.value == type){
                return value.name;
            }
        }
        return "";
    }

    public static int valueOfStatus(int type){
        for(EmployeeLableGroup value : EmployeeLableGroup.values()){
            if(value.value == type){
                return value.status;
            }
        }
        return -1;
    }

    public static int valueOfType(String name){
        for(EmployeeLableGroup value : EmployeeLableGroup.values()){
            if(value.name.equals(name)){
                return value.value;
            }
        }
        return -1;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public int getStatus() {
        return status;
    }
}
